//
//  NotifyTableViewCell.swift
//  LongTermInsurance
//
//  Created by zolobdz on 2018/11/24.
//  Copyright © 2018年 HeChao. All rights reserved.
//

import UIKit

class NotifyTableViewCell: UITableViewCell {


    
    @IBOutlet weak var typeLabel: UILabel!
    @IBOutlet weak var titleLabel: UILabel!
    @IBOutlet weak var dateLabel: UILabel!
    @IBOutlet weak var watchCountButton: UIButton!
        
    
    var model: NotifyModel! {
        willSet {
            if (newValue != nil) {
                typeLabel.text = newValue.type
                titleLabel.text = newValue.title
                dateLabel.text = String(newValue.date.prefix(10))
                watchCountButton.setTitle("\(newValue.readCount)", for: .normal)
            }
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        selectionStyle = .none
        
        typeLabel.layer.cornerRadius = 15.0
        typeLabel.clipsToBounds = true
    }

   
    
}
